package com.data.basic.chapter07;



/**
 * Created by wangbing on 2018/5/10.
 */
public class Main {
    public static void main(String[] args) {
        int [] arr = new int[10];
        for(int i = 0;i<10;i++){
            final int index = i;
            arr[index] = index*i;

        }
        for (Integer integer :arr){
            System.out.println(integer);
        }




        //    Error
        Thread thread = new Thread(new Runnable() {
            public void run() {
                System.out.println("thread");
            }
        });

        try {
            thread.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }



}
